Web Server FAQ

Last Reviewed 2026-06-22

 

NOTE: If you have sensitive data, you should not use this service.

 

Who is responsible for the department's web server?
Computer services maintains the hardware, operating system, and web server software. For problems and questions not answered in this document, please email help@cs.unc.edu or use the contact button on this site. The overall design and content is maintained by the department's publications staff. Please email the publications staff at er@cs.unc.edu about content questions not answered in this document.

 

Why can't I log onto the WWW server?
It is not a good idea to have your main web server used as a general purpose login server. This can cause performance and security related problems for the web server.

 

How do I access the WWW file space?
The web server is configured to access files and documents in two ways: Most documents are served from shared NFS space. Other documents are stored in AFS. Both can be accessed from a departmental Linux machine configured with the NFS or AFS client.

 

How do I create my own personal home page?
Please see How to Create a Personal Home Page to set up your own page. You must have a valid Computer Science login account.

 

Where can I run CGI or PHP scripts?
CGI scripts, (Common Gateway Interface) and PHP scripts are programs that are accessed via web pages and run on the department's web server. Such programs can have serious security and performance implications. CGI or PHP programs in your personal web pages will not run on the www server. Web pages that need to run CGI programs on www need to be approved by Computer Services. Please email help@cs.unc.edu with a detailed request and information about the CGI scripts you want to implement on the department's web server.

 

How do I enable directory listings for one of my directories?
If your web directory contains an index.html, index.htm, or index.shtml page, the server will automatically display those pages.  If you would like instead for a listing of files to show up for a particular directory, then you must create a file called ".htaccess" that contains the option entry "Options +Indexes" in the directory you want to be listed.  Note: any sub-directory under this directory will also have directory listings turned on!  To turn off directory listings in these directories use "Options -Indexes" in the .htaccess file.  Directory listings are turned off at the server level by default for security reasons, so a listing of files will not show up unless you explicitly allow this to happen.

 

 

How can I limit access to my web pages?
The Apache web server software provides several methods for limiting access to your web pages: You can limit access by domain names, internet addresses, or passwords. You can also combine these methods.

 

NOTE: If you use passwords, you should use our secure SSL https://www.cs.unc.edu/ server when specifying links to protected pages. This way users' passwords will be encrypted when entering their password information.

 

With each of the methods, the first step is to create a file in the web directory you want protected and call the file ".htaccess".  The web server will process this file if it exists in any directory that is being accessed.  All directories and files under the protected directory will be protected using the directives you specify in your .htaccess file.

 

Limit by user name

The following will limit web pages to all users who have a Computer Science AD account.

 
    AuthName 'Computer Science Login:'
    AuthType Kerberos
    require valid-user

 

 

To limit access to only certain users replace the "require valid-user" line with line(s) like

 

require user joe@CS.UNC.EDU
require user mary@CS.UNC.EDU

 

This will limit access to joe and mary. Joe and Mary must have valid Computer Science AD account!  You must use capital letters for CS.UNC.EDU!

 

To find out more information about Apache directives (keywords) specified in the .htaccess file, see the Apache online reference manual.

 

How can I redirect my home page to another site?
If you would like to redirect your home page to another web server, create a .htaccess file in your ~user/public_html directory that contains the following entry:

 

RedirectMatch permanent (.*)$ http://www.othersite.edu$1

 

Replace the web server name with the othersite.  Note the "$1" is required.  All content will no be redirected to the other site.

 

Contact Our Team

If you still can't find an answer to what you're looking for, or you have a specific question, open a new ticket and we'd be happy to help!

Contact Us